package com.demo.jwt;

import io.jsonwebtoken.JwtBuilder;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;

import java.util.Date;

/**
 * Created by Administrator on 2020/7/14.
 */
public class CreateJwt {
    public static void main(String[] args) {
        JwtBuilder jwtBuilder = Jwts.builder().setId("666").setSubject("马哥").setIssuedAt(new Date()).signWith(SignatureAlgorithm.HS256,"demo");
        System.out.println(jwtBuilder.compact());
    }
}
